/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.oimwrapper.testers;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;

/**
 *
 */
public class JavaCodeTester {
    
    @Test
    public void mainTest()
    {
        
        Map map1 = new HashMap();
        Map map2 = new HashMap();
        
        map1.put("FNAME","Fred");
        map2.put("FNAME","Margie");
        
        List mapList = new ArrayList();
        
        mapList.add(map1);
        mapList.add(map2);
        
        Map[] mapArray = new Map[mapList.size()];
        
        mapList.toArray(mapArray);
        
        for(Map m : mapArray)
        {
            System.out.println("Map Ent " + m);
        }
        
        mapArray = null;
        mapArray = (Map[])mapList.toArray(new Map[0]);
        
        for(Map m : mapArray)
        {
            System.out.println("Map Ent " + m);
        }
        
        for(int i=mapArray.length-1;i>=0;i--)
        {
            System.out.println("I " + i + " Map " + mapArray[i]);
        }
            
    }

}
